#!/usr/bin/python3
# -*- coding: UTF-8 -*-
#文件内容替换脚本

import os
path="/Users/lizhifeng/Documents/线上试客/key配置/keys/"
def modifyFile(file):
	if "DS_Store" in file:
		return
	f = open(path+file,"r",encoding="utf-8")
	delegate=f.read()
	f.close()

	new = delegate.replace("aliAuth :","aliAuth:")
	
	if new != delegate:

		os.remove(path+file)

		w = open(path+file,"w",encoding="utf-8")
		w.write(new)
		
		w.close()
	return

def main():
	#文件读取
	dirs = os.listdir(path)
	for dir in dirs:
	    modifyFile(dir)


main()
